<script setup lang="ts">
defineProps<{
  // money: number
  modelValue: number
  car: string
  house: string
}>()

const emit = defineEmits<{
  (e: 'update:modelValue', money: number): void
  (e: 'update:car', car: string): void
  (e: 'update:house', house: string): void
}>()
</script>

<template>
  <div class="greetings">子组件</div>
  <div>钱包: {{ modelValue }}</div>
  <button @click="emit('update:modelValue', 30000)">搬砖一个月</button>
  <div>车: {{ car }}</div>
  <button @click="emit('update:car', '小米su7')">换车</button>
  <div>房: {{ house }}</div>
  <button @click="emit('update:house', '农村大別野')">盖房</button>
</template>

<style scoped></style>
